# Contributor: Lindsay Zhou <i@lin.moe>
# Maintainer: Lindsay Zhou <i@lin.moe>
pkgname=fcitx5-kkc
pkgver=5.1.5
pkgrel=0
pkgdesc="libkkc input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-kkc"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	fcitx5-qt-dev
	libkkc-dev
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-kkc/archive/refs/tags/$pkgver.tar.gz
	cxx17.patch
	"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
da66b709c90fb0af3be10864f537f31990f0b9a972cfc9c70ebeec4b21a70ac6916714dcab195e2d2f6d1f66c6af6016b0a8209b27d0b2f12a7c37147e38a1cd  fcitx5-kkc-5.1.5.tar.gz
e58e74bc15497462414d2fbb99c0685249de5f5a5850d39696dfde7e3c171d5932a9b2f4bfd3d4a9c2e2d103ad2456cd2e7d0545a254b55b79cecb08d953d779  cxx17.patch
"
